/**
 * Description:
 * Class Name:NullInHashMap
 * Date:2022/3/6 14:21
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第8章_Java集合._8_6_增强的Map集合._8_6_2_改进的HashMap和Hashtable实现类;

import java.util.HashMap;

public class NullInHashMap {
    public static void main(String[] args) {
        var hm = new HashMap();
        // 试图将两个key作为null值的key-value对放入HashMap中
        hm.put(null, null);
        hm.put(null, null);
        // 将一个value为null值的key-value放入HashMap中
        hm.put("a", null);
        System.out.println(hm);
    }
}
